apiready = () ->
  $signin = $ '#signin'
  $signinQQ = $ '#signin-qq'
  $signinWeixin = $ '#signin-weixin'

  $signin.on tap, () ->
    L.sendSmsCode '13350804217'
    .then (ret) ->
      api.alert
        msg: ret
    .then null, (err) ->
      api.alert
        msg: err
    # api.setPrefs
    #   key: 'userinfo'
    #   value:
    #     username: 'test'
    # api.closeWin
    #   name: 'signin'

  $signinQQ.on tap, () ->
    alert('ggodd')

  $signinWeixin.on 'click', () ->
    alert('bad')
